package com.chen.controller;

import com.chen.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class HelloController {

    @Autowired
    User user;
    @Value("${users.phone}")
    private String phone;



   @RequestMapping("/hello")
    public String hello(){
       System.out.println(user);
       return "hello springboot"+"电话号码:"+phone;
   }
}
